<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateFbadsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('fbads', function (Blueprint $table) {
            $table->increments('id');
            $table->string('a_template')->nullable()->comment('A面模板');
            $table->string('a_url')->nullable()->comment('A面网址');
            $table->string('b_url')->nullable()->comment('B面网址');
            $table->string('agent')->nullable()->comment('代理线');
            $table->tinyInteger('isjump')->default('0')->nullable()->comment('是否跳转');
            $table->integer('visits_success')->default('0')->nullable()->comment('成功次数');
            $table->integer('visits_error')->nullable()->comment('失败次数');
            $table->string('country')->nullable()->comment('投放国家');
            $table->string('white_list')->nullable()->comment('IP白名单');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('fbads');
    }
}
